package com.ifonly.plugin;

import java.util.ArrayList;
import java.util.List;

/**
 * @author <a href="mailto:ifonlymaster@163.com">ifonly</a>
 * @version 1.0 2015-12-10 13:24
 * @since JDK 1.6
 */
public class Plugins {

    private Plugins() {

    }

    private static class InstanceHolder {
        private static Plugins instance = new Plugins();
    }

    public static Plugins getInstance() {
        return InstanceHolder.instance;
    }

    private List<Plugin> plugins = new ArrayList<Plugin>();

    public void add(Plugin plugin) {
        plugins.add(plugin);
    }

    public List<Plugin> getPlugins() {
        return plugins;
    }

}
